
package com.shop.cloud.live.common.constant;

/**
 * 播放类型 1.rtmp 2.flv 3.m3u8
 * @author
 */
public enum PlayType {

    /** RTMP */
    RTMP(1),

    /** FLV */
    FLV(2),

    /** M3U8 */
    M3U8(3);

    private final Integer code;

    public Integer value() {
        return code;
    }

    PlayType(Integer code) {
        this.code = code;
    }

    public static PlayType instance(Integer value) {
        PlayType[] enums = values();
        for (PlayType statusEnum : enums) {
            if (statusEnum.value().equals(value)) {
                return statusEnum;
            }
        }
        return null;
    }

}
